package hk.ust.cse.comp3111.studentSchedule;

import java.util.TreeSet;

//used for checking redundancy when adding course
public class RegisteredClass {
	
	private TreeSet<Integer> registeredClass = new TreeSet();

	public RegisteredClass(){	}
	
	public void insert(int classCode){
		registeredClass.add(classCode);
	}
	
	public void delete(int classCode){
		registeredClass.remove(classCode);
	}
	
	public boolean search(int classCode){
		if(registeredClass.isEmpty()) return false;
		if(registeredClass.contains(classCode)) return true;
		else return false;
	}
	
	
	
	
	
}
